package com.hhs.storage.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.hhs.storage.bean.InputParam;
import com.hhs.storage.bean.JxcProduct;
import com.hhs.storage.dao.JxcProductDao;
import com.hhs.storage.service.JxcProductService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author shadow
 * @since 2018-12-18
 */
@Service
public class JxcProductServiceImpl extends ServiceImpl<JxcProductDao, JxcProduct> implements JxcProductService {

    @Override
    public Page<JxcProduct> findPage( InputParam inputParam) {
        Page<JxcProduct> page = new Page<>(inputParam.getPage(),inputParam.getSize());// 当前页，总条数 构造 page 对象
        return page.setRecords(this.baseMapper.findPage(page,inputParam));
    }
}
